package cn.chinaunicom.dingtalk.sender.entity.interactive;


import cn.hutool.json.JSONObject;
import lombok.Data;

/**
 * 卡片交互回调
 */
@Data
public class CardResponseBody {
    /**
     * 卡片唯一id
     */
    private String outTrackId;
    /**
     * 交互回调的内容
     */
    private String content;
    /**
     * 用户的钉钉ID
     */
    private String userId;

    /**
     * 事件类型
     */
    private String type;

    public CardResponseBody(JSONObject cardResponseBody) {
        this.outTrackId = cardResponseBody.getStr("outTrackId");
        this.content = cardResponseBody.getStr("content");
        this.userId = cardResponseBody.getStr("userId");
        this.type = cardResponseBody.getStr("type");
    }

}
